<html>
<head>
<title>Venus</title>
<meta http-equiv="Content-Type" content="text/html; charset=iso-8859-1">
<link rel="stylesheet" href="<?echo $rela_path?>inc/css.css" type="text/css">

<script language="JavaScript" type="text/JavaScript">
<!--

function Redirect(target,type){
	
/* redirect to a new location OR pop up a new window 
 * variable: target	-> redirect to
 * variable: type	-> location to a new URL OR pop up window OR other
 */
	
  switch (type){
  	case 1:
  	  window.parent.location = target; 
	  break;
	case 2:	  
		var HEIGHT = 500;
		var WIDTH = 700;		window.open(target,"detail","height="+HEIGHT+",width="+WIDTH+",top=20,left=20,location=no,menubar=no,scrollbars=yes,resizable=yes,status=yes,toolbar=no,"); 

	  break;
	case 3:	  
		var HEIGHT = 300;
		var WIDTH = 400;		window.open(target,"edit","height="+HEIGHT+",width="+WIDTH+",top=200,left=200,location=no,menubar=no,scrollbars=no,resizable=no,status=yes,toolbar=no,"); 

	  break;
	case 4:
	  window.showModalDialog(target,"choose","Height: 200; Width: 275; help: no");
	  break;
	default:	
	  break;
  }

}

function submitForm(theform, url, type) { 

 switch (type){

	case 1:
	
		if (eval(theform).Code.value == "" || eval(theform).Code.value == "Enter Code ..."){ 
			msg = "Please enter code!"; 
			window.alert (msg); 
			eval(theform).Code.focus(); 
			return false;
		}else{  
			eval(theform).action = url; 
			eval(theform).submit(); 
		}

		break;

	case 2:

		eval(theform).action = url; 
		eval(theform).submit(); 

		break;

	case 3:
	
		if (validate_email(eval(theform).Email.value)== false){ 
			msg = "Invalid Email!"; 
			window.alert (msg); 
			eval(theform).Email.focus(); 
			//return false;
		}else{  
			eval(theform).action = url; 
			eval(theform).submit(); 
		}

		break;

	defalut:

		break;
 }

} 

function validate_email(email)
{
  if (!validate_ascii_data (email)) {
    return false
  }

  var invalidChars = "\"|&;<>!*\'\\"   ;

  for (var i = 0; i < invalidChars.length; i++) {
    if (email.indexOf(invalidChars.charAt(i)) != -1) {
      return false;
    }
  }
 
  if (email.indexOf("@")==-1){
     return false;
  }
        
  if (email.indexOf(" ") != -1){
    return false;
  }

  if (window.RegExp) {

    var reg1str = "(@.*@)|(\\.\\.)|(@\\.)|(\\.@)|(^\\.)";
    var reg2str = "^.+\\@(\\[?)[a-zA-Z0-9\\-\\.]+\\.([a-zA-Z]{2,3}|[0-9]{1,3})(\\]?)$";
    
    var reg1 = new RegExp (reg1str);
    var reg2 = new RegExp (reg2str);
    if (reg1.test(email) || !reg2.test(email)) {
      return false;
    }
  }
  return true;
}

function validate_ascii_data(urstr)
{
  var i; var result;
  for(i=0; i<urstr.length; i++) {
    if((urstr.charAt(i) < " ") || (urstr.charAt(i) > "~"))
      return false;
  }
  return true;
}


//-->
</script>

</head>

<body text="#000000" leftmargin="0" topmargin="0" marginwidth="0" marginheight="0">


<table width="100%" border="0" cellspacing="0" cellpadding="0" class="header">
  <tr>
    <td>&nbsp;</td>
  </tr>
  <tr> 
    <td width="190"> 
      <table width="190" border="0" cellspacing="0" cellpadding="0">
        <tr> 
          <td><img src="<?echo $rela_path?>images/logo.gif" width="190" height="60" border="0"></td>
        </tr>
        <tr> 
          <td height="6"><img src="<?echo $rela_path?>images/nav.gif" width="190" height="6"></td>
        </tr>
      </table>
    </td>
    
    <?  
    
    for ($i=0;$i<count($nav_target);$i++){    	
    	
    	$img = $i + 1;
    	
    	if ($img==$nav_actived){
    	  $img = $nav_img[$i] . "1";
    	  print("<td><a href=\"" . $rela_path . $nav_target[$i] . $FILETYPE . "\"><img src=\"" . $rela_path . "images/" . $img . ".gif\" width=\"74\" height=\"66\" border=\"0\"></a></td>");
    	}else{
		  $img = $nav_img[$i];
			print("<td><a href=\"" . $rela_path . $nav_target[$i] . $FILETYPE . "\"><img src=\"" . $rela_path . "images/" . $img . ".gif\" width=\"74\" height=\"66\" border=\"0\"></a></td>");    	
    	}
    	

    }
    
    ?>
    
    <td width="100%">
      <table width="100%" border="0" cellspacing="0" cellpadding="0">
        <tr> 
          <td height="60">
            <table border="0" cellspacing="0" cellpadding="0">
              <tr> 
                <td width="60%">&nbsp;</td>
                <td>
				<?
				if(session_is_registered("admin_name")) {
				?>
				<a href="<?echo $rela_path?>logout.php"><img src="<?echo $rela_path?>images/bt_logout.gif" border="0"></a>
				<?
				}else{
				?>
<a href="<?echo $rela_path?>index.php"><img src="<?echo $rela_path?>images/bt_login.gif" border="0"></a>
				<?}?>
				</td>
				<td width="200">&nbsp;</td>
              </tr>
            </table>
          </td>
        </tr>
        <tr> 
          <td background="<?echo $rela_path?>images/nav.gif" height="6"><img src="<?echo $rela_path?>images/shim.gif" width="1" height="6"></td>
        </tr>
      </table>
    </td>
  </tr>
</table>
<table width="100%" border="0" cellspacing="0" cellpadding="0" background="<?echo $rela_path?>images/nav_bk3.gif">
  <tr>
    <td>
      <table width="100%" height="30" border="0" cellpadding="0" cellspacing="0">
        <tr> 
          <td width="574" class="heading1"><img src="<?echo $rela_path?>images/shim.gif" width="16" height="1" align="absmiddle"><?echo $location_status?></td>
          <!--<td width="20"><img src="<?echo $rela_path?>images/nav_bk2.gif" width="20" height="74"></td>-->
          
          <?
          if (!NULL==$show_backnav){
            print("<td align=\"right\"><b><a href=\"" . $show_backnav . $FILETYPE . "?label=" . urlEncode($label) . "&id=$parent_id\" class=\"nav\"><img src=\"" . $rela_path . "images/bt_backtolist1.gif\" border=\"0\" align=\"absmiddle\"></a></b></td>");
          }
          
          ?>

		<td width="40" class="heading1">&nbsp;</td>
            
            
        </tr>
      </table>
    </td>
  </tr>
</table>





<table width="100%" border="0" cellspacing="0" cellpadding="0">
  <tr> 
    <td width="96%"><table width="100%" border="0" cellspacing="0" cellpadding="0">
        <tr> 
          <td valign="top"> <table width="100%" border="0" cellspacing="0" cellpadding="0" background="<?echo $rela_path?>images/menu_bk.gif" height="25">
              <tr> 
                <td>
				<img src="<?echo $rela_path?>images/shim.gif" width="16" height="1" align="absmiddle">
<?
$currentfilename = eregi_replace(".php","",basename($PHP_SELF));

if (!NULL==$menuname){
  for ($i=0;$i<count($menuname);$i++){
    if ($menutarget[$i] == $currentfilename){
      print("<span class=\"menu\">$menuname[$i]</span>");
      print("<img src=\"" . $rela_path . "images/menu_line.gif\" width=\"12\" height=\"12\" align=\"absmiddle\">");
    }else{


      if($menutype==1 && $menuname[$i]!= "list"){
      	print("<a href=\"javascript:submitForm('form1','" . $menutarget[$i]. $FILETYPE ."',1)\" class=\"menu\">$menuname[$i]</a>");
      }

	  else if($menutype==2){

      print("<a href=\"" . $menutarget[$i] . $FILETYPE . "?id=$id\" class=\"menu\">$menuname[$i]</a>");
	  }


      else if($menutype==3 && $menuname[$i]!= "list"){
      	print("<a href=\"javascript:submitForm('form1','" . $menutarget[$i]. $FILETYPE ."',3)\" class=\"menu\">$menuname[$i]</a>");
      }
	  
	  else{
      print("<a href=\"" . $menutarget[$i] . $FILETYPE . "\" class=\"menu\">$menuname[$i]</a>");
      }




      print("<img src=\"" . $rela_path . "images/menu_line.gif\" width=\"12\" height=\"12\" align=\"absmiddle\">");
    }
  }
}

?>				
              </td>
              </tr>
            </table>
            <table width="100%" border="0" cellspacing="0" cellpadding="0" background="<?echo $rela_path?>images/menu_sd.gif" height="4">
              <tr> 
                <td><img src="<?echo $rela_path?>images/shim.gif" width="1" height="4"></td>
              </tr>
            </table>
            <table width="100%" border="0" cellspacing="0" cellpadding="0">
              <tr> 
                <td class="cbody">